<?php
if (APPLICATION_ENV == 'production') {
    $this->JQuery()->clearJavascriptFiles();
    $this->JQuery()->addJavascriptFile(Ac_Util::getImageBaseUrl('/js/all.min.v-'.AC_VERSION.'.js'));
    $this->headLink()->prependStylesheet(Ac_Util::getImageBaseUrl('/css/custom_post_ad.v-'.AC_VERSION.'.css'));
} else {
    $this->JQuery()->addJavascriptFile(Ac_Util::getImageBaseUrl('/js/tipsy/jquery.tipsy.v-'.AC_VERSION.'.js'));
    $this->JQuery()->addJavascriptFile(Ac_Util::getImageBaseUrl('/js/script.v-'.AC_VERSION.'.js'));
}

$grid_size = (boolean) (string) $this->placeholder('grid-size');
if (!$grid_size) {
    $grid_size = 12;
} else {
    $grid_size = (string) $this->placeholder('grid-size');
}


Zend_Registry::set('grid-size', $grid_size);

if (APPLICATION_ENV == 'production') {
    $this->headLink()->prependStylesheet(Ac_Util::getImageBaseUrl('/css/all.v-'.AC_VERSION.'.css'));
	$this->headLink()->prependStylesheet(Ac_Util::getImageBaseUrl('/css/custom_post_ad.v-'.AC_VERSION.'.css'));
} else {
    $this->headLink()->prependStylesheet(Ac_Util::getImageBaseUrl('/css/custom.v-'.AC_VERSION.'.css'));
    $this->headLink()->appendStylesheet(Ac_Util::getImageBaseUrl('/css/tipsy/tipsy.v-'.AC_VERSION.'.css'));
    $this->headLink()->prependStylesheet(Ac_Util::getImageBaseUrl('/css/theme/sunny.v-'.AC_VERSION.'.css'));
    $this->headLink()->prependStylesheet(Ac_Util::getImageBaseUrl('/css/slideshow/nivo-slider.v-'.AC_VERSION.'.css'));
    //$this->headLink()->prependStylesheet('/css/sudoCss/Sudostyle.css?v='.AC_VERSION);
    $this->headLink()->prependStylesheet(Ac_Util::getImageBaseUrl('/css/grid_'.$grid_size.'.v-'.AC_VERSION.'.css'));
    //$this->headLink()->prependStylesheet('/css/handheld.css');
	$this->headLink()->prependStylesheet(Ac_Util::getImageBaseUrl('/css/custom_post_ad.v-'.AC_VERSION.'.css'));
    $this->headLink()->prependStylesheet(Ac_Util::getImageBaseUrl('/css/style.v-'.AC_VERSION.'.css'));
    $this->headLink()->prependStylesheet(Ac_Util::getImageBaseUrl('/css/reset.v-'.AC_VERSION.'.css'));
}

?>
<!doctype html>

<html lang="en" class="no-js">
    <head>
        <meta charset="utf-8">
        <!--[if IE]><![endif]-->
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <?php echo $this->headTitle() ?>
        <meta name="description" content="">
        <meta name="author" content="AsiaClassified.com - Easy, Free, Local">
        <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
        <link rel="shortcut icon" href="/favicon.ico">
        <link rel="apple-touch-icon" href="/apple-touch-icon.png">    
		<!--link href="http://asset2.dev-asset.beta2.asiaclassified.com/css/custom_post_ad.v-0.css" media="screen" rel="stylesheet" type="text/css" -->
	    <script src="<?php echo '/js/modernizr-1.5.min.js';?>"></script>
        <?php echo $this->headLink() ?>
        <?php echo $this->headStyle() ?>

    </head>
    <!--[if lt IE 7 ]> <body class="ie6 index"> <![endif]-->
    <!--[if IE 7 ]>    <body class="ie7 index"> <![endif]-->
    <!--[if IE 8 ]>    <body class="ie8 index"> <![endif]-->
    <!--[if IE 9 ]>    <body class="ie9 index"> <![endif]-->
    <!--[if gt IE 9]>  <body class="index">             <![endif]-->
    <!--[if !IE]><!--> <body class="">         <!--<![endif]-->

        <div id="container" class="container container_12 <?php echo $this->placeholder('container-class');?>">
            <header class="header grid_12">
                <a href="/"><h6>AsiaClassified asiaclassified.com easy free local</h6></a>
			</header>
            <article>
				
				<?php echo $this->layout()->content; ?>
			
                <?php 
                $url_tc = $this->url_tc;
                $url_en = $this->url_en;
                ?>                
                <aside class="aside">
                  <section class="help">
                    <p class="nav"> 
                    <a class="country_hk" href="#">Hong Kong</a>
                    <?php if ($this->current_language == 'en'):?>
                        <a href="<?php echo $url_tc?>" class="language_chi_t">中文</a>
                    <?php else:?>
                        <a href="<?php echo $url_en?>" class="language_eng_t">English</a>
                    <?php endif;?>
                    <a href="http://asiaclassifiedblog.tumblr.com/"><?php echo $this->t('Blog');?></a>
                    <a href="http://asiaclassified.zendesk.com/home"><?php echo $this->t('Help');?></a>
                    </p>

                  </section>
                  <section class="login">

                  </section>
                </aside>                
            </article>
            <footer class="footer grid_12">
                <h6><a href="/">AsiaClassified.com</a></h6>
                <p><?php echo $this->t('Copyright &copy; 2008-2010 HongKong. AsiaClassified.com All rights reserved.')?></p>
                <p class="nav"><a  class="rel_to_href" rel="<?php echo $this->geturl('privacy','default',null,'default1')?>" ><?php echo $this->t('Privacy Policy')?></a> <a  class="rel_to_href" rel="<?php echo $this->geturl('term-of-use','default',null,'default1')?>"><?php echo $this->t('Terms of Use')?></a></p>
            </footer>            
        </div>
        <!--! end of #container -->
        <!--script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
        <script>!window.jQuery && document.write('<script src="js/jquery-1.4.2.min.js"><\/script>')</script-->
        <!--script src="/js/plugins.js?v=1"></script-->
        <!--script src="/js/script.js?v=1"></script-->

        <!--[if lt IE 7 ]>
            <script src="js/dd_belatedpng.js?v=1"></script>
          <![endif]-->

        <!--script src="/js/profiling/yahoo-profiling.min.js?v=1"></script>
        <script src="/js/profiling/config.js?v=1"></script-->
        <!-- Javascript at the bottom for fast page loading -->
        <!-- Grab Google CDN's jQuery. fall back to local if necessary -->
        <!--script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
        <script>!window.jQuery && document.write('<script src="/js/jquery-1.4.2.min.js"><\/script>')</script-->
        <?php echo $this->headScript() ?>
        <?php echo $this->JQuery() ?>
                <!--script src="/js/plugins.js?v=1"></script-->
                <!--script src="/js/script.js?v=1"></script-->

                <!--[if lt IE 7 ]>
                  <script src="/js/dd_belatedpng.js?v=1"></script>
                <![endif]-->

        <?php /*
                  <!-- yui profiler and profileviewer - remove for production -->
                  <script src="/js/profiling/yahoo-profiling.min.js?v=1"></script>
                  <script src="/js/profiling/config.js?v=1"></script>
                  <!-- end profiling code -->
                 */ ?>

        <?php if (defined('GOOGLE_ANALYTICS')): ?>
                    <!-- asynchronous google analytics: mathiasbynens.be/notes/async-analytics-snippet
                         change the UA-XXXXX-X to be your site's ID -->
                    <script>
                        var _gaq = [['_setAccount', '<?php echo GOOGLE_ANALYTICS ?>'], ['_trackPageview']];
                        (function(d, t) {
                            var g = d.createElement(t),
                            s = d.getElementsByTagName(t)[0];
                            g.async = true;
                            g.src = '//www.google-analytics.com/ga.js';
                            s.parentNode.insertBefore(g, s);
                        })(document, 'script');
                    </script>
        <?php endif; ?>
        <?php echo $this->placeholder('at-the-bottom');?>
    </body>
</html>
